import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
//引入数据库表模块
import { test_jy, jy_data, summary } from 'src/entities/Wealth.entity'

// 控制层
import { WealthController } from './wealth.controller'
// 供应
import { WealthService } from './wealth.service'
import { WealthService_jyData } from './wealth_jyData.service'
// 网关
// import { WealthGateway } from './wealth.gateway'

/* 组装 */
@Module({
  imports: [
    // 注册实体类 注册表 
    // forFeature 用于动态获取模块对象
    // forFeature() 方法来定义在当前作用域中注册了哪些存储库
    TypeOrmModule.forFeature([ 
      test_jy, 
      jy_data, 
      summary 
    ]),
  ],
  controllers: [WealthController],
  // 提供者
  providers: [ 
    WealthService, 
    WealthService_jyData, 
    // WealthGateway,
  ],
})

export class WealthModule {

}